'use strict';
var bbsApp = angular.module("bbsApp", ["ui.router",'tm.pagination','ngFileUpload'],function ($httpProvider) {  
    $httpProvider.defaults.headers.post['Content-Type'] = 'application/json';  
    $httpProvider.defaults.headers.post['X-Requested-With'] = 'XMLHttpRequest'; 
});

bbsApp.config(["$stateProvider", "$urlRouterProvider", "$locationProvider", "$httpProvider",
	function($stateProvider, $urlRouterProvider, $locationProvider, $httpProvider){
		//默认进入采购单管理页面
		$urlRouterProvider.otherwise("/topics");
		//新增采购
		$stateProvider.state("purchaseOrdersAdd", {
			url : "/purchaseOrdersAdd",
			templateUrl : "views/purchaseOrdersAdd.html",
			controller : "purchaseOrdersAddCtrl"
		})
		
		//主题列表
		.state("topics", {
			url : "/topics",
			templateUrl : "views/components/topics.html",
			controller : "topicsCtrl"
		})
		//主题发起
		.state("publish", {
			url : "/publish",
			templateUrl : "views/components/publish.html",
			controller : "publishCtrl"
		})
		//主题发起
		/*.state("publish.nav", {
			url : "/abc",
			templateUrl : "views/components/test.html"
		})*/
		//主题查看
		.state("topic", {
			url : "/topics/:id",
			templateUrl : "views/components/topic.html",
			controller : "topicCtrl"
		})
		//早餐券设置
		/*.state("homeBreakfast", {
			url : "/homeBreakfast",
			templateUrl : "views/breakfast/homeBreakfast.html",
			controller : "homeBreakfast_Controller"
		})*/
		//顾客管理列表页面
		/*.state("memberList", {
			url : "/memberList",
			templateUrl : "views/member/memberList.html",
			controller : "memberListCtrl"
		})*/
		//查看会员信息
		/*.state("memberDetails", {
			url : "/memberDetails/:id/:mobile",
			templateUrl : "views/member/memberDetails.html",
			controller : "memberDetailsCtrl"
		})*/
	}
]);

